# $Id: PKGBUILD 183115 2013-04-17 16:05:23Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=libpst
pkgname=('libpst' 'libpst-docs')
pkgver=0.6.58
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.five-ten-sg.com/libpst/"
license=('GPL')
makedepends=('python2' 'boost' 'libgsf')
source=(http://www.five-ten-sg.com/libpst/packages/${pkgbase}-${pkgver}.tar.gz)
sha1sums=('c398d58b8b5106725f1659c900305c6385c0773e')

build() {
  cd "${srcdir}/${pkgbase}-${pkgver}"
  ./configure --prefix=/usr --mandir=/usr/share/man \
      --disable-static --enable-libpst-shared --disable-dii PYTHON_VERSION=2
  make
}

package_libpst() {
  pkgdesc="Outlook .pst file converter"
  depends=('gcc-libs' 'libgsf')
  optdepends=('boost-libs: for libpst python interface')
  options=('!libtool' '!docs')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}

package_libpst-docs() {
  pkgdesc="Documentation for Outlook .pst file converter"
  options=('!libtool' 'docs')

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install-htmlDATA
  cd "${srcdir}/${pkgbase}-${pkgver}/html"
  make DESTDIR="${pkgdir}" install-htmldevelDATA
}
